<template>
  <div class="index-portrait sub-margin">
    <div class="content">
      <div class="search-box">
        <el-menu
          size="small"
          :default-active="activeCode"
          class="search-menu-box"
          mode="horizontal"
          @select="onMenuClick">
          <el-menu-item v-for="item in menuList" :key="item.status" :index="item.status">
            {{ item.label }}
          </el-menu-item>
        </el-menu>
      </div>
      <div class="table-con">
        <div class="right-con">
          <JuSelfPortrait v-if="activeCode === '1'"></JuSelfPortrait>
          <SelfPortrait v-if="activeCode === '2'"></SelfPortrait>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import JuSelfPortrait from './JuSelf/JuSelfPortrait'
import SelfPortrait from './Self/SelfPortrait.vue'
export default {
  name: 'PSKH_JXXIAO_PORTRAIT',
  components: { JuSelfPortrait, SelfPortrait },
  props: {},
  data() {
    return {
      menuList: [
        {
          label: '绩效统计',
          status: '1',
        },
        {
          label: '个人绩效画像',
          status: '2',
        },
        // {
        //   label: '全局部门',
        //   status: '3',
        // },
        // {
        //   label: '部门画像',
        //   status: '4',
        // },
      ],
      activeCode: '1',
    }
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {},
  methods: {
    onMenuClick(code) {
      this.activeCode = code
    },
  },
}
</script>
<style lang="scss" scoped>
@import '@styles/layout.scss';
.index-portrait {
  height: 100%;

  .content {
    // height: calc(100% - 78px);
    height: calc(100% - 8px);
    padding: 0 0 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    .search-box {
      width: 100%;
      .el-menu {
        .is-active {
          font-weight: bold;
          font-size: 16px;
        }
      }
    }
    .table-con {
      flex: 1;
      display: flex;
      align-items: stretch;
      padding: 10px 0;
      height: calc(100% - 50px);
      background-color: #f3f6fd;
      .left-con {
        width: 300px;
        height: 100%;
        overflow: auto;
        position: relative;
        border-right: 1px solid #e4eaf0;
      }

      .right-con {
        flex: 1;
        width: 100%;
        // max-width: 1200px;
        margin: 0 auto;
        // margin-left: 20px;
        position: relative;
        display: flex;
        flex-direction: column;
      }
    }
  }
}
</style>
